Skip to content

[Storage] Add sdk/storage/AGENTS.md and sdk/storage/azure_storage_blob/AGENTS.md#4708

Open
amnguye wants to merge 5 commits into
mainfrom
copilot/add-storage-agents-md
Open

[Storage] Add sdk/storage/AGENTS.md and sdk/storage/azure_storage_blob/AGENTS.md#4708
amnguye wants to merge 5 commits into
mainfrom
copilot/add-storage-agents-md

Conversation

@amnguye

@amnguye amnguye commented Jul 7, 2026

Copy link
Copy Markdown
Member

This PR introduces a shared sdk/storage/AGENTS.md for storage-wide conventions and a more specific sdk/storage/azure_storage_blob/AGENTS.md for blob crate guidance, including API consistency, request construction, testing expectations, and common pitfalls.

Copilot AI review requested due to automatic review settings July 7, 2026 20:25
@github-actions github-actions Bot added the Storage Storage Service (Queues, Blobs, Files) label Jul 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds two documentation-only AGENTS.md files to give AI agents storage-specific guidance: a storage-family-wide file at sdk/storage/AGENTS.md and a Blob Storage crate-specific file at sdk/storage/azure_storage_blob/AGENTS.md. They cover API/design conventions, request construction, auth, testing expectations, common pitfalls, and task playbooks, complementing the repository-root AGENTS.md. No source code, build, or test behavior is affected.

Changes:

  • New sdk/storage/AGENTS.md with storage-wide conventions, a "storage family map", error handling, testing strategy, and agent task playbooks.
  • New sdk/storage/azure_storage_blob/AGENTS.md with blob-specific API/design, request/protocol, testing, and pitfall guidance.
  • One factual inaccuracy: the storage family map lists a non-existent azure_storage crate and omits azure_storage_common, azure_storage_queue, and azure_storage_sas.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
sdk/storage/AGENTS.md New storage-wide agent guidance; family map references a non-existent azure_storage crate (should be azure_storage_common).
sdk/storage/azure_storage_blob/AGENTS.md New blob-crate agent guidance; content is accurate and consistent with the crate (which has a src/generated/ tree).

Comment thread sdk/storage/AGENTS.md Outdated

@heaths heaths left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll let @vincenttran-msft or @jalauzon-msft sign off or suggest changes, but I highly suggest having Copilot itself - with context including these files:

  1. Reduce duplication by making sure it understands that the blob one extends the storage one which extends the repo one.
  2. Be concise to reduce token cost but keep it reviewable by humans (a common instruction I give that seems to work well).
  3. Ask how to tighten up vague instructions - a couple examples of which I flagged. Depending on the model and other context, you're going to get wildly different - and sometimes problematic - output.

@@ -0,0 +1,114 @@
# AGENTS.md – Blob Storage crate guidance

This file provides AI-agent guidance for work under `sdk/storage/azure_storage_blob/*`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this really be root-relative? Have you tested if it's impactful?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same concern for the other file.


## API design conventions

- Keep public APIs ergonomic and predictable for common blob workflows.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds vague. See overall comment for suggestion.

## Request construction and protocol details

- Ensure optional blob request parameters are threaded consistently into headers and query parameters.
- Be careful with conditional request semantics (`If-Match`, `If-None-Match`, modified-since, lease conditions, etc.).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also vague. I'll not repeat.

Comment thread sdk/storage/AGENTS.md Outdated
Comment on lines +53 to +59
From repo root (or scoped to affected crates as appropriate):

- `cargo fmt`
- `cargo clippy -p <crate> --all-targets --all-features`
- `cargo test -p <crate>`

When touching multiple crates, run checks for each affected crate.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This - and probably other things - are duplicated. Don't waste tokens.

Refactor blob-specific guidance in AGENTS.md to clarify scope, expectations, and testing requirements.
Copilot AI review requested due to automatic review settings July 16, 2026 20:34
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Condensed guidance for storage crates, focusing on consistency and minimalism. Removed redundant sections and clarified instructions for crate-specific details.
Copilot AI review requested due to automatic review settings July 16, 2026 20:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

Comment on lines +5 to +6
Use this together with:
- repository root `AGENTS.md`
Comment thread sdk/storage/AGENTS.md
Comment on lines +38 to +39
### Add optional header/query option
1. Add to options/builder with default `None`.
Comment thread sdk/storage/AGENTS.md
Comment on lines +44 to +45
### Add pagination option
1. Extend options/docs.
Comment thread sdk/storage/AGENTS.md
Comment on lines +50 to +51
### Change response/deserialization
1. Prefer additive/backward-compatible changes.
Comment thread sdk/storage/AGENTS.md
Comment on lines +54 to +55
### Add operation
1. Follow neighboring storage operation structure and naming.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

Comment on lines +5 to +7
Use this together with:
- repository root `AGENTS.md`
- `sdk/storage/AGENTS.md`
Comment thread sdk/storage/AGENTS.md
Comment on lines +38 to +39
### Add optional header/query option
1. Add to options/builder with default `None`.
Comment thread sdk/storage/AGENTS.md
Comment on lines +44 to +45
### Add pagination option
1. Extend options/docs.
Comment thread sdk/storage/AGENTS.md
Comment on lines +50 to +51
### Change response/deserialization
1. Prefer additive/backward-compatible changes.
Comment thread sdk/storage/AGENTS.md
Comment on lines +54 to +55
### Add operation
1. Follow neighboring storage operation structure and naming.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants